package com.ktjy.goods.controller;


import com.ktjy.common.core.controller.BaseController;
import com.ktjy.common.core.page.TableDataInfo;
import com.ktjy.goods.domain.Weather;
import com.ktjy.goods.service.WeatherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.nio.file.WatchService;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 规格属性表 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-03-18
 */
@RestController
@RequestMapping("/weather/")
public class WeatherController extends BaseController {

    @Autowired
    private WeatherService weatherService;

    @PreAuthorize("@ss.hasPermi('weather:weather:list')")
    @GetMapping("/list")
    public TableDataInfo list(String date)
    {
        System.out.println("goodsAttrAll()--------------------"+date);
        List<Weather> list = weatherService.selectWeather(date);
        return getDataTable(list);
    }
}
